using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MeetingRoom.Domain;
using MeetingRoom.Data;
using MeetingRoom.Data.Implementation;
using MeetingRoom.Support;

namespace MeetingRoom.Service.Workflow.Implementation
{
    /// <summary>
    /// Summary description for AddSchedule
    /// </summary>
    public class AddSchedule : IWorkflowPhase
    {
        public AddSchedule()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        protected ICreate create = null;

        public ICreate Create
        {
            set
            {
                this.create = value;
            }
        }

        #region IWorkflowPhase Members

        public void Execute(object request)
        {
            Assert.IsNotNull(request, "");
            Assert.IsType(request, typeof(Schedule));

            Schedule schedule = (Schedule)request;
            SimpleScheduleDao.Create(schedule);
        }

        #endregion
    }
}